﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
using System.Drawing;
using System.Globalization;
using Barbar.MapReport.Common;
using System.Xml.Serialization;

namespace Barbar.MapReport.Common.Drawing.Commands {
  [XmlType(Namespace=Constants.XmlNamespace)]
  [Serializable]
  public class AddGraphsCommand : DrawingCommand {
    private DynamicBehavior m_DynamicBehavior;
    private string m_ValueFormatString;
    private Collection<SerializedColor> m_Colors = new Collection<SerializedColor>();
    private Collection<MultipleBusinessGeoPoint> m_Points = new Collection<MultipleBusinessGeoPoint>();
    private int m_MaxHeight;
    private int m_ColumnWidth;
    private SerializedColor m_TitleColor;

    public SerializedColor TitleColor {
      get { return m_TitleColor; }
      set { m_TitleColor = value; }
    }

    public DynamicBehavior DynamicBehavior {
      get { return m_DynamicBehavior; }
      set { m_DynamicBehavior = value; }
    }

    public string ValueFormatString {
      get { return m_ValueFormatString; }
      set { m_ValueFormatString = value; }
    }

    public Collection<SerializedColor> Colors {
      get { return m_Colors; }
      set { m_Colors = value; }
    }

    public Collection<MultipleBusinessGeoPoint> Points {
      get { return m_Points; }
      set { m_Points = value; }
    }

    public int MaxHeight {
      get { return m_MaxHeight; }
      set { m_MaxHeight = value; }
    }

    public int ColumnWidth {
      get { return m_ColumnWidth; }
      set { m_ColumnWidth = value; }
    }

    public override void Render(IRenderer renderer) {
      renderer.AddGraphs(this);
    }
  }
}
